package com.yixun.qfbao.response.premisesdynamic;
/**
 * @author zilong.liu
 * @date 2020-9-10
 * 	楼盘动态列表返回实体类
 */

import java.util.ArrayList;
import java.util.List;

import org.springframework.util.CollectionUtils;

import com.yixun.qfbao.xf.model.PremisesDynamic;

import lombok.Data;

@Data
public class PremisesDynamicPageResDto {

	private List<PremisesDynamicResDto> premisesDynamicResDtoList;
	
	public void addPremisesDynamicResDto(PremisesDynamicResDto premisesDynamicResDto) {
		if(CollectionUtils.isEmpty(premisesDynamicResDtoList)) {
			premisesDynamicResDtoList = new ArrayList<>();
		}
		premisesDynamicResDtoList.add(premisesDynamicResDto);
	}
	
	public void addPremisesDynamicResDto(PremisesDynamic premisesDynamic) {
		PremisesDynamicResDto premisesDynamicResDto = new PremisesDynamicResDto(premisesDynamic);
		this.addPremisesDynamicResDto(premisesDynamicResDto);
	}
	
	public void addPremisesDynamicResDtos(List<PremisesDynamic> premisesDynamicList) {
		for (PremisesDynamic premisesDynamic : premisesDynamicList) {
			this.addPremisesDynamicResDto(premisesDynamic);
		}
	}
}
